package org.ucas.faker.web.dao;


import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;
import org.ucas.faker.web.entity.patents.Patent;

import java.util.HashMap;
import java.util.List;

@Mapper
@Repository
public interface PatentMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Patent record);

    int insertSelective(Patent record);

    Patent selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Patent record);

    int updateByPrimaryKey(Patent record);



    Long selectByAppNumber(@Param("flowId") Long flowId,
                           @Param("applicationNumber") String applicationNumber);



    List<HashMap<String, Object>> selectByFlowNumber(@Param("flowId") long flowId);

    List<HashMap<String, Object>> selectPatentGroupByFlowNumber(@Param("flowId") long flowId);

    Integer querySelectByAppNumber(@Param("flowId") Long flowId,
                                   @Param("applicationNumber") String applicationNumber);
//    
//    
//    @Select("SELECT * FROM patent WHERE flow_id = #{flowId}")
//    @ResultMap("PatentResultMap")
//    List<Patent> insert(@Param("flowId") long flowId);
    
    
    
}